/**
 * @param {number[][]} ranges
 * @param {number} left
 * @param {number} right
 * @return {boolean}
 */
console.log(isCovered([
    [1, 7],
    [3, 4],
    [5, 6]
], 2, 3));

function isCovered(ranges, left, right) {
    for (let i = left; i < right + 1; i++) {
        for (let j = 0; j < ranges.length; j++) {
            if (a(ranges[j], i)) { break; }
            if (j == ranges.length - 1) { return false; }

        }
        if (i == right) { return true; }

    }


};


function a(item, key) {
    if (key >= item[0] && key <= item[1]) {
        return true;
    } else {
        return false;
    }
}